#include "lib/global.h"
#include "lib/memctrl.h"
#include "memory/bitmap.h"
int main(void)
{
    bitmap test;
    //五个需要申请块的进程
    uint32_t blocks[5];
    //管理40个块
    InitBitmap(&test, 5, PTR_T(0x70000));
    blocks[0] = GetBitsBlock(&test, 8);
    blocks[1] = GetBitsBlock(&test, 5);
    FreeBitsBlock(&test, blocks[0], 8);
    blocks[2] = GetBitsBlock(&test, 5);
    blocks[3] = GetBitsBlock(&test, 19);
    FreeBitsBlock(&test, blocks[2], 5);
    FreeBitsBlock(&test, blocks[1], 5);
    blocks[0] = GetBitsBlock(&test, 8);
    blocks[2] = GetBitsBlock(&test, 10);
    blocks[4] = GetBitsBlock(&test, 6);
    while(1);
    return 0;
}